/******************************************************************************
	[AudioOut.h]
		オーディオインタフェイスを定義します．

	Copyright (C) 2004 Ki

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
******************************************************************************/
#ifndef AUDIO_OUT_H_INCLUDED
#define AUDIO_OUT_H_INCLUDED

#include "TypeDefs.h"

#define AOUT_BUFFERRATE 4	//Kitao追加。バッファを4つに分けて持つ。数が少ないほうが音の遅延は少なく済むが、数が多いほうが音が安定し音質も上がる。v2.70更新


BOOL
AOUT_Init(
	Sint32		soundType,	//Kitao追加
	Uint32		bufSize,	// in samples 
	Uint32		sampleRate,
	void		(*pCallBack)(int ch, Sint16* pBuf, Sint32 nSamples)); //Kitao更新。ch(チャンネルナンバー)を追加

void
AOUT_Play(
	BOOL		bPlay);

void
AOUT_Deinit();

//Kitao追加
void
AOUT_SetPlayStart();

//Kitao追加
BOOL
AOUT_GetPlay();

//Kitao追加
BOOL
AOUT_GetThreadStarted();

//Kitao追加
void
AOUT_SetFpOutputWAV(
	FILE*	fp,
	Sint32	mode);

//Kitao追加
FILE*
AOUT_GetFpOutputWAV();

//Kitao追加
void
AOUT_SetOutputWavFileSize(
	DWORD	size);

//Kitao追加
DWORD
AOUT_GetOutputWavFileSize();

//Kitao追加
Sint32
AOUT_GetOutputWavWaitFinish();

//Kitao追加
FILE*
AOUT_GetfpOutputWAV();

//WAV出力実行処理。AudioOutX,AudioOut9からも使用。v2.70
void
AOUT_OutputWavExecute(
	DWORD		dwBufSize,						
	Sint16*		pAudioBuf1,
	Sint16*		pAudioBuf2,
	Sint16*		pAudioBuf3);

//Kitao追加。v2.70
void
AOUT_InitWavMixBuf(
	DWORD		dwBufSize);

//Kitao追加。v2.70
void
AOUT_DeinitWavMixBuf();


#endif // AUDIO_OUT_H_INCLUDED
